package com.vtest.quartz.service;

import com.vtest.quartz.domain.job.SysJob;
import com.vtest.quartz.utils.exception.TaskException;
import org.quartz.SchedulerException;

import java.util.List;

public interface SysJobService {

    public void init() throws SchedulerException, TaskException;


    /**
     * 获取quartz调度器的计划任务
     *
     * @return 调度任务集合
     */
    public List<SysJob> selectJobList();

    /**
     * 新增任务
     *
     * @param job 调度信息
     * @return 结果
     */
    public int insertJob(SysJob job) throws SchedulerException, TaskException;
}
